package com.itheima.ip;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Demo01 {


    public static void main(String[] args) throws UnknownHostException {

        //getByName()
        InetAddress ip = InetAddress.getByName("192.168.17.95");

        System.out.println(ip.getHostName());
        System.out.println(ip.getHostAddress());

    }
}
